3.220 \(\int \tanh ^2(x) (a+b \tanh ^2(x))^{3/2} \, dx\)

Optimal. Leaf size=123 \[ -\frac{\left (3 a^2+12 a b+8 b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right )}{8 \sqrt{b}}-\frac{1}{4} b \tanh ^3(x) \sqrt{a+b \tanh ^2(x)}-\frac{1}{8} (5 a+4 b) \tanh (x) \sqrt{a+b \tanh ^2(x)}+(a+b)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a+b} \tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right ) \]

[Out]

-((3*a^2 + 12*a*b + 8*b^2)*ArcTanh[(Sqrt[b]*Tanh[x])/Sqrt[a + b*Tanh[x]^2]])/(8*Sqrt[b]) + (a + b)^(3/2)*ArcTa
nh[(Sqrt[a + b]*Tanh[x])/Sqrt[a + b*Tanh[x]^2]] - ((5*a + 4*b)*Tanh[x]*Sqrt[a + b*Tanh[x]^2])/8 - (b*Tanh[x]^3
*Sqrt[a + b*Tanh[x]^2])/4

________________________________________________________________________________________

Rubi [A]  time = 0.244414, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.412, Rules used = {3670, 477, 582, 523, 217, 206, 377} \[ -\frac{\left (3 a^2+12 a b+8 b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right )}{8 \sqrt{b}}-\frac{1}{4} b \tanh ^3(x) \sqrt{a+b \tanh ^2(x)}-\frac{1}{8} (5 a+4 b) \tanh (x) \sqrt{a+b \tanh ^2(x)}+(a+b)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a+b} \tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Tanh[x]^2*(a + b*Tanh[x]^2)^(3/2),x]

[Out]

-((3*a^2 + 12*a*b + 8*b^2)*ArcTanh[(Sqrt[b]*Tanh[x])/Sqrt[a + b*Tanh[x]^2]])/(8*Sqrt[b]) + (a + b)^(3/2)*ArcTa
nh[(Sqrt[a + b]*Tanh[x])/Sqrt[a + b*Tanh[x]^2]] - ((5*a + 4*b)*Tanh[x]*Sqrt[a + b*Tanh[x]^2])/8 - (b*Tanh[x]^3
*Sqrt[a + b*Tanh[x]^2])/4

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 477

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(d*(e*x)
^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 1))/(b*e*(m + n*(p + q) + 1)), x] + Dist[1/(b*(m + n*(p + q) + 1
)), Int[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^(q - 2)*Simp[c*((c*b - a*d)*(m + 1) + c*b*n*(p + q)) + (d*(c*b - a*d
)*(m + 1) + d*n*(q - 1)*(b*c - a*d) + c*b*d*n*(p + q))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && N
eQ[b*c - a*d, 0] && IGtQ[n, 0] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 582

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
 x_Symbol] :> Simp[(f*g^(n - 1)*(g*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*d*(m + n*(p + q
+ 1) + 1)), x] - Dist[g^n/(b*d*(m + n*(p + q + 1) + 1)), Int[(g*x)^(m - n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*
f*c*(m - n + 1) + (a*f*d*(m + n*q + 1) + b*(f*c*(m + n*p + 1) - e*d*(m + n*(p + q + 1) + 1)))*x^n, x], x], x]
/; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && IGtQ[n, 0] && GtQ[m, n - 1]

Rule 523

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*Sqrt[(c_) + (d_.)*(x_)^(n_)]), x_Symbol] :> Dist[f/b, I
nt[1/Sqrt[c + d*x^n], x], x] + Dist[(b*e - a*f)/b, Int[1/((a + b*x^n)*Sqrt[c + d*x^n]), x], x] /; FreeQ[{a, b,
 c, d, e, f, n}, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rubi steps

\begin{align*} \int \tanh ^2(x) \left (a+b \tanh ^2(x)\right )^{3/2} \, dx &=\operatorname{Subst}\left (\int \frac{x^2 \left (a+b x^2\right )^{3/2}}{1-x^2} \, dx,x,\tanh (x)\right )\\ &=-\frac{1}{4} b \tanh ^3(x) \sqrt{a+b \tanh ^2(x)}-\frac{1}{4} \operatorname{Subst}\left (\int \frac{x^2 \left (-a (4 a+3 b)-b (5 a+4 b) x^2\right )}{\left (1-x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tanh (x)\right )\\ &=-\frac{1}{8} (5 a+4 b) \tanh (x) \sqrt{a+b \tanh ^2(x)}-\frac{1}{4} b \tanh ^3(x) \sqrt{a+b \tanh ^2(x)}-\frac{\operatorname{Subst}\left (\int \frac{-a b (5 a+4 b)-b \left (3 a^2+12 a b+8 b^2\right ) x^2}{\left (1-x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tanh (x)\right )}{8 b}\\ &=-\frac{1}{8} (5 a+4 b) \tanh (x) \sqrt{a+b \tanh ^2(x)}-\frac{1}{4} b \tanh ^3(x) \sqrt{a+b \tanh ^2(x)}+(a+b)^2 \operatorname{Subst}\left (\int \frac{1}{\left (1-x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tanh (x)\right )-\frac{1}{8} \left (3 a^2+12 a b+8 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\tanh (x)\right )\\ &=-\frac{1}{8} (5 a+4 b) \tanh (x) \sqrt{a+b \tanh ^2(x)}-\frac{1}{4} b \tanh ^3(x) \sqrt{a+b \tanh ^2(x)}+(a+b)^2 \operatorname{Subst}\left (\int \frac{1}{1-(a+b) x^2} \, dx,x,\frac{\tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right )-\frac{1}{8} \left (3 a^2+12 a b+8 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{\tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right )\\ &=-\frac{\left (3 a^2+12 a b+8 b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right )}{8 \sqrt{b}}+(a+b)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a+b} \tanh (x)}{\sqrt{a+b \tanh ^2(x)}}\right )-\frac{1}{8} (5 a+4 b) \tanh (x) \sqrt{a+b \tanh ^2(x)}-\frac{1}{4} b \tanh ^3(x) \sqrt{a+b \tanh ^2(x)}\\ \end{align*}

Mathematica [C]  time = 6.20248, size = 584, normalized size = 4.75 \[ \sqrt{\frac{a \cosh (2 x)+a+b \cosh (2 x)-b}{\cosh (2 x)+1}} \left (\frac{1}{8} \text{sech}(x) (-5 a \sinh (x)-6 b \sinh (x))+\frac{1}{4} b \tanh (x) \text{sech}^2(x)\right )+\frac{1}{4} \left (-\frac{b \left (a^2-4 a b-4 b^2\right ) \sinh ^4(x) \text{csch}(2 x) \sqrt{\frac{(a+b) \cosh (2 x)+a-b}{\cosh (2 x)+1}} \sqrt{-\frac{a \coth ^2(x)}{b}} \sqrt{-\frac{a (\cosh (2 x)+1) \text{csch}^2(x)}{b}} \sqrt{\frac{\text{csch}^2(x) ((a+b) \cosh (2 x)+a-b)}{b}} \text{EllipticF}\left (\sin ^{-1}\left (\frac{\sqrt{\frac{\text{csch}^2(x) ((a+b) \cosh (2 x)+a-b)}{b}}}{\sqrt{2}}\right ),1\right )}{a ((a+b) \cosh (2 x)+a-b)}-\frac{4 i b \left (4 a^2+8 a b+4 b^2\right ) \sqrt{\cosh (2 x)+1} \sqrt{\frac{(a+b) \cosh (2 x)+a-b}{\cosh (2 x)+1}} \left (\frac{i \sinh ^4(x) \text{csch}(2 x) \sqrt{-\frac{a \coth ^2(x)}{b}} \sqrt{-\frac{a (\cosh (2 x)+1) \text{csch}^2(x)}{b}} \sqrt{\frac{\text{csch}^2(x) ((a+b) \cosh (2 x)+a-b)}{b}} \Pi \left (\frac{b}{a+b};\left .\sin ^{-1}\left (\frac{\sqrt{\frac{(a-b+(a+b) \cosh (2 x)) \text{csch}^2(x)}{b}}}{\sqrt{2}}\right )\right |1\right )}{2 (a+b) \sqrt{\cosh (2 x)+1} \sqrt{(a+b) \cosh (2 x)+a-b}}-\frac{i \sinh ^4(x) \text{csch}(2 x) \sqrt{-\frac{a \coth ^2(x)}{b}} \sqrt{-\frac{a (\cosh (2 x)+1) \text{csch}^2(x)}{b}} \sqrt{\frac{\text{csch}^2(x) ((a+b) \cosh (2 x)+a-b)}{b}} \text{EllipticF}\left (\sin ^{-1}\left (\frac{\sqrt{\frac{\text{csch}^2(x) ((a+b) \cosh (2 x)+a-b)}{b}}}{\sqrt{2}}\right ),1\right )}{4 a \sqrt{\cosh (2 x)+1} \sqrt{(a+b) \cosh (2 x)+a-b}}\right )}{\sqrt{(a+b) \cosh (2 x)+a-b}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[x]^2*(a + b*Tanh[x]^2)^(3/2),x]

[Out]

(-((b*(a^2 - 4*a*b - 4*b^2)*Sqrt[(a - b + (a + b)*Cosh[2*x])/(1 + Cosh[2*x])]*Sqrt[-((a*Coth[x]^2)/b)]*Sqrt[-(
(a*(1 + Cosh[2*x])*Csch[x]^2)/b)]*Sqrt[((a - b + (a + b)*Cosh[2*x])*Csch[x]^2)/b]*Csch[2*x]*EllipticF[ArcSin[S
qrt[((a - b + (a + b)*Cosh[2*x])*Csch[x]^2)/b]/Sqrt[2]], 1]*Sinh[x]^4)/(a*(a - b + (a + b)*Cosh[2*x]))) - ((4*
I)*b*(4*a^2 + 8*a*b + 4*b^2)*Sqrt[1 + Cosh[2*x]]*Sqrt[(a - b + (a + b)*Cosh[2*x])/(1 + Cosh[2*x])]*(((-I/4)*Sq
rt[-((a*Coth[x]^2)/b)]*Sqrt[-((a*(1 + Cosh[2*x])*Csch[x]^2)/b)]*Sqrt[((a - b + (a + b)*Cosh[2*x])*Csch[x]^2)/b
]*Csch[2*x]*EllipticF[ArcSin[Sqrt[((a - b + (a + b)*Cosh[2*x])*Csch[x]^2)/b]/Sqrt[2]], 1]*Sinh[x]^4)/(a*Sqrt[1
 + Cosh[2*x]]*Sqrt[a - b + (a + b)*Cosh[2*x]]) + ((I/2)*Sqrt[-((a*Coth[x]^2)/b)]*Sqrt[-((a*(1 + Cosh[2*x])*Csc
h[x]^2)/b)]*Sqrt[((a - b + (a + b)*Cosh[2*x])*Csch[x]^2)/b]*Csch[2*x]*EllipticPi[b/(a + b), ArcSin[Sqrt[((a -
b + (a + b)*Cosh[2*x])*Csch[x]^2)/b]/Sqrt[2]], 1]*Sinh[x]^4)/((a + b)*Sqrt[1 + Cosh[2*x]]*Sqrt[a - b + (a + b)
*Cosh[2*x]])))/Sqrt[a - b + (a + b)*Cosh[2*x]])/4 + Sqrt[(a - b + a*Cosh[2*x] + b*Cosh[2*x])/(1 + Cosh[2*x])]*
((Sech[x]*(-5*a*Sinh[x] - 6*b*Sinh[x]))/8 + (b*Sech[x]^2*Tanh[x])/4)

________________________________________________________________________________________

Maple [B]  time = 0.022, size = 633, normalized size = 5.2 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(x)^2*(a+b*tanh(x)^2)^(3/2),x)

[Out]

-1/4*tanh(x)*(a+b*tanh(x)^2)^(3/2)-3/8*a*tanh(x)*(a+b*tanh(x)^2)^(1/2)-3/8*a^2/b^(1/2)*ln(tanh(x)*b^(1/2)+(a+b
*tanh(x)^2)^(1/2))+1/6*((1+tanh(x))^2*b-2*(1+tanh(x))*b+a+b)^(3/2)-1/4*b*((1+tanh(x))^2*b-2*(1+tanh(x))*b+a+b)
^(1/2)*tanh(x)-3/4*b^(1/2)*ln(((1+tanh(x))*b-b)/b^(1/2)+((1+tanh(x))^2*b-2*(1+tanh(x))*b+a+b)^(1/2))*a-1/2*(a+
b)^(1/2)*ln((2*a+2*b-2*(1+tanh(x))*b+2*(a+b)^(1/2)*((1+tanh(x))^2*b-2*(1+tanh(x))*b+a+b)^(1/2))/(1+tanh(x)))*a
+1/2*((1+tanh(x))^2*b-2*(1+tanh(x))*b+a+b)^(1/2)*a-1/2*b^(3/2)*ln(((1+tanh(x))*b-b)/b^(1/2)+((1+tanh(x))^2*b-2
*(1+tanh(x))*b+a+b)^(1/2))-1/2*(a+b)^(1/2)*ln((2*a+2*b-2*(1+tanh(x))*b+2*(a+b)^(1/2)*((1+tanh(x))^2*b-2*(1+tan
h(x))*b+a+b)^(1/2))/(1+tanh(x)))*b+1/2*((1+tanh(x))^2*b-2*(1+tanh(x))*b+a+b)^(1/2)*b-1/6*((tanh(x)-1)^2*b+2*(t
anh(x)-1)*b+a+b)^(3/2)-1/4*b*((tanh(x)-1)^2*b+2*(tanh(x)-1)*b+a+b)^(1/2)*tanh(x)-3/4*b^(1/2)*ln(((tanh(x)-1)*b
+b)/b^(1/2)+((tanh(x)-1)^2*b+2*(tanh(x)-1)*b+a+b)^(1/2))*a+1/2*ln((2*a+2*b+2*(tanh(x)-1)*b+2*(a+b)^(1/2)*((tan
h(x)-1)^2*b+2*(tanh(x)-1)*b+a+b)^(1/2))/(tanh(x)-1))*(a+b)^(1/2)*a-1/2*((tanh(x)-1)^2*b+2*(tanh(x)-1)*b+a+b)^(
1/2)*a-1/2*b^(3/2)*ln(((tanh(x)-1)*b+b)/b^(1/2)+((tanh(x)-1)^2*b+2*(tanh(x)-1)*b+a+b)^(1/2))+1/2*ln((2*a+2*b+2
*(tanh(x)-1)*b+2*(a+b)^(1/2)*((tanh(x)-1)^2*b+2*(tanh(x)-1)*b+a+b)^(1/2))/(tanh(x)-1))*(a+b)^(1/2)*b-1/2*((tan
h(x)-1)^2*b+2*(tanh(x)-1)*b+a+b)^(1/2)*b

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tanh \left (x\right )^{2} + a\right )}^{\frac{3}{2}} \tanh \left (x\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^2*(a+b*tanh(x)^2)^(3/2),x, algorithm="maxima")

[Out]

integrate((b*tanh(x)^2 + a)^(3/2)*tanh(x)^2, x)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^2*(a+b*tanh(x)^2)^(3/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tanh ^{2}{\left (x \right )}\right )^{\frac{3}{2}} \tanh ^{2}{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)**2*(a+b*tanh(x)**2)**(3/2),x)

[Out]

Integral((a + b*tanh(x)**2)**(3/2)*tanh(x)**2, x)

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(x)^2*(a+b*tanh(x)^2)^(3/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError